


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Ввод брутто значений</title>
</head>

<body bgcolor="#CCCCCC">
<script language="javascript" src="dynaddline.js">//скрипт для динамического добавления строчек</script>
<script language="javascript" src="matematika.js"></script>
<form method="post">
<span id="shapka">
<table>
	<tr align="center">
	    <td colspan="5"><h1>Ввод брутто значений</h1></td>
    </tr>
    <tr>
    	<td>Предприятие:</td>
        <td><input name="fab_nom_inputfield" type="text" value="136" size="8" readonly="readonly" style="background-color:#66FFCC" /></td>
        <td><input name="fab_name_inputfield" type="text" value="KNAUF GIPS KOLPINO" size="30" readonly="readonly" style="background-color:#66FFCC" /></td>
        <td>Дата:</td>
        <td><input name="date_inputfield" type="text" value="3.12.2004" size="12" readonly="readonly" style="background-color:#66FFCC" /></td>
    </tr>
    <tr>
    	<td>Ресурсы:</td>
        <td><input name="res_nom_inputfield" type="text" value="136" size="8" readonly="readonly" style="background-color:#66FFCC" /></td>
      <td><input name="res_name_inputfield" type="text" value="BS KOLPINO" size="30" readonly="readonly" style="background-color:#66FFCC"/></td>
        <td>Смена:</td>
        <td><input name="smena_inputfield" type="text" value="2" size="12" readonly="readonly" style="background-color:#66FFCC"/></td>
    </tr>
</table>
</span>
<br />

<span id="table">
<table border="1">
<tr>
    	<td>№ арт.</td>
        <td>Описание артикула</td>
        <td>Шир.</td>
    <td>Пог. метры</td>
        <td>Шт.</td>
        <td>Продолж.</td>
        <td colspan="2">Прич. прост.</td>
        <td>Место прост.</td>
        <td><a href="#" onclick="return addline();">Добавить</a></td>
    </tr>
    <tr id="newline" nomer="[0]">
    	<td><select name="art_nom_selectfield[0]" onchange='redraw_artdescr()'>
    			<option value=""> </option><option value="0000001">0000001</option><option value="0000002">0000002</option><option value="0000003">0000003</option>        	</select>
        </td>
        <td><select name="art_desc_selectfield[0]" onchange='redraw_artdescr1()'>
    			<option value=""> </option><option value="0000001">Лист Гипсовый</option><option value="0000002">Плита Гипсовая</option><option value="0000003">Кирпич Обыкновенный</option>		</td>
        <td><input name="shirina_inputfield[0]" type="text" value="" size="5"/></td>
        <td><input name="pog_metr_inputfield[0]" type="text" value="" size="6" /></td>
        <td><input name="shtuk_inputfield[0]" type="text" value="" size="2" /></td>
        <td><input name="prodolzh_inputfield[0]" type="text" value="" onkeyup='count1("")' size="2" /></td>
        <td><select name="prichprost_nom_selectfield[0]">
        		<option value="1">1</option>
                <option value="2">2</option>
		    </select>
        </td>
        <td><input name="prichprost_desc_selectfield[0]" type="text" value="" size="10" /></td>
        <td><select name="mestoprost_selectfield[0]">
<option value="1">1</option>
                <option value="2">2</option>
		    </select>
        </td>               
		<td valign="top"><a href="#" onclick="return rmline(0);"/>Удалить</td>
    </tr>
</table>

</span>
<br />
Суммарная продолжительность: <input name="sumprodolzh" type="text" value="" readonly="readonly" style="background-color:#66FFCC" />
</form>
<br />
<input type="button" onclick="buttnclick()" value="button" />
</body>
</html>

<script>
function redraw_artdescr()//подгружает описание к артикулу
{
//	redraw_selectfield('artikul.txt', 'art_nom_selectfield', 'art_desc_selectfield');
	var i;
	var archoices=new Array();
	var suffix1='art_nom_selectfield';
	var suffix2='art_desc_selectfield';
	for (i=0;i< 3;i++)
	{
//		archoices[i]=Array;
//		alert (i);alert(archoices[i]["rus"]);
	}
	for (i=0;i<=250;i++)
	{
		if (typeof(document.getElementsByName(suffix1+'['+i+']')[0])!='undefined')
		{
			hand=document.getElementsByName(suffix1+'['+i+']')[0];
			choice=hand.options[hand.selectedIndex].value;
			document.getElementsByName(suffix2+'['+i+']')[0].value=choice;	
		}
	}
}

function redraw_artdescr1()//подгружает артикул к описанию
{
//	redraw_selectfield('artikul.txt','art_desc_selectfield','art_nom_selectfield');
	var i;
	var archoices=new Array();
	var suffix1='art_desc_selectfield';
	var suffix2='art_nom_selectfield';
	for (i=0;i< 3;i++)
	{
		archoices[i]=;
	}
	for (i=0;i<=250;i++)
	{
		if (typeof(document.getElementsByName(suffix1+'['+i+']'))!='undefined')
		{
			hand=document.getElementsByName(suffix1+'['+i+']')[0];
			choice=hand.options[hand.selectedIndex].value;
			document.getElementsByName(suffix2+'['+i+']')[0].value=choice;	
		}
	}
}
</script>